
%\documentclass[letterpaper,12pt]{article}
%\usepackage[x11names,rgb]{xcolor}
%\usepackage{tikz}
%\usetikzlibrary{snakes}
%\usetikzlibrary{arrows}
%\usetikzlibrary{shapes}
%\usetikzlibrary{backgrounds}
%\usepackage{amsmath}
%\oddsidemargin 0in
%\evensidemargin 0in
%\topmargin 0in
%\headheight 0in
%\headsep 0in
%\textheight 9in
%\textwidth 6.5in
%\begin{document}
%\pagestyle{empty}
%\vspace*{\fill}
%\begin{center}
\documentclass{article}
 
\usepackage[pdftex,active,tightpage]{preview}
\usepackage{tikz}
\usetikzlibrary{snakes}
\usetikzlibrary{arrows}
\makeatletter
 
\begin{document}
\begin{preview}
	%%
	\begin{tikzpicture}[scale=2.0, level distance=8mm]
			\tikzstyle{edge from parent}=[black,->,shorten <=1pt,>=stealth',semithick,draw]
			\tikzstyle{level 1}=[sibling distance=8mm]
			\tikzstyle{level 2}=[sibling distance=6mm]
			\tikzstyle{level 3}=[sibling distance=4mm]
				
	    \node[black,fill=red!30,rounded corners] {root}
						child { node[fill=blue!30,rounded corners] {nl}
							child { node[fill=green!30,rounded corners] {a}}
							child { node[fill=blue!30,rounded corners] {nl}
								child { node[fill=green!30,rounded corners] {b}}
								child { node[fill=green!30,rounded corners] {c}}
								child { node[fill=green!30,rounded corners] {d}}
								child { node[fill=green!30,rounded corners] {e}}
							}
							child { node[fill=green!30,rounded corners] {f}}
							child { node[fill=green!30,rounded corners] {g}}
						}
						child { node[fill=green!30,rounded corners] {h}}
						child { node[fill=green!30,rounded corners] {i}}
						child { node[fill=blue!30,rounded corners] {nl}
								child { node[fill=green!30,rounded corners] {j}}
								child { node[fill=green!30,rounded corners] {k}}
								child { node[fill=green!30,rounded corners] {l}}
								child { node[fill=green!30,rounded corners] {m}}
						};
						
				%% Draw levels axis ...
				\draw[->] (-3,0) -- (-3,-3);		
				\draw[snake=ticks,segment length=0.95cm] (-3,0) -- (-3,-2.4);
				
				\draw (-2.8,0) node {$0$}
							(-2.8,-0.8) node {$1$}
							(-2.8,-1.6) node {$2$}
							(-2.8,-2.4) node {$3$};
				\draw (-3.3,-1.6) node [rotate=90] {$level$};	
	 	\end{tikzpicture} 	%%
\end{preview}
\end{document}

%\end{center}
%\vspace*{\fill}
%\end{document}
